<?php get_header() ?>
<?php
$option = get_option('tvpresident_1_settings');
?>
<style>
#content .row .entry-content {
height: 130px;
overflow: hidden;
}
</style>
<!-- Page Body (Sidebars and Content) -->
    <section id="body">
      <div class="container">
        <div class="row">
          <!-- Content -->
          <section id="content" class="span9">
			<div class="inner breadcrumb">
                <?php if(function_exists('bcn_display'))
                {
                    bcn_display();
                }?>
            </div>     
            <!-- Smaller Items -->
            <div class="row">
              <div id="masonry">
                <?php
                while (have_posts()): the_post(); 
				$found = 0;
				$news = (isset($_GET['lang'])&&$_GET['lang']=='en')?$option['news_en']:$option['news_vi'];
				$products = (isset($_GET['lang'])&&$_GET['lang']=='en')?$option['category_en']:$option['category_vi'];
				foreach((get_the_category()) as $category) { 
					if($category->cat_ID==$news || $category->cat_ID==$products){
						$found = 1;
						break;
					}					 
				} 
				if(!$found) continue;
				?>
                  <article class="post type-post inner post post-size-small">
                    <div class="post-media">
                      <a href="<?php the_permalink() ?>" class="thumbnail">
                        <?php the_post_thumbnail(array(280,200),array('style'=>'width:280px;height:200px;')); ?>
                      </a>
                    </div>
                    <div class="entry-content">
                      <h2 class="entry-title">
                        <a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
                      </h2>
                    </div>
                    <p class="more-link"><a class="btn" href="<?php the_permalink() ?>"><?php _e( 'Read more', 'tvpresident' ); ?></a></p>
                  </article>
               <?php endwhile; ?>
              </div>
            </div>
          </section>
          <!-- #content -->
          <!-- Right Sidebar -->
          <?php get_sidebar() ?>
          <!-- #right-sidebar -->
        </div>
      </div>
    </section>
<?php get_footer() ?>